package com.ag.wsq.action;


import java.util.List;

import org.apache.log4j.Logger;

import com.ag.bean.TbSched;
import com.ag.common.BaseAction;
import com.ag.common.PageUtil;
import com.ag.wsq.service.impl.SchedServiceImpl;
/*
 * @author 王淑其
 */
public class SchedAction extends BaseAction {

	private static final Logger logger = Logger.getLogger(SchedAction.class);
	private SchedServiceImpl schedServiceImpl;
	private PageUtil  pageUtil;
	private int total;
	private int page;
	private int maxRow;
	private String name;
	private String timeStart;
	private String timeEnd;
	private String id;
	private List result;
	private String UId;
	private String UName;
	private List<TbSched> scheds;
	private TbSched sched = new TbSched();
	private String duId;
	private String dsName1;
	
	public String add(){
		schedServiceImpl.save(sched);
		return "addOK";
		
	}
	
	public String find(){
		System.out.println("total"+total+"--");
		System.out.println("page"+page+"--");
		System.out.println("maxRow"+maxRow+"--");
		System.out.println("timeStart"+timeStart+"--");
		System.out.println("timeEnd"+timeEnd+"--");
		pageUtil = schedServiceImpl.queryAll(total, page, maxRow, UId, UName, timeStart, timeEnd);
		System.out.println("pageUtil----"+pageUtil.getPage()+"--");
		return "findOK";
	}
			
	public String getUId() {
		return UId;
	}
	public void setUId(String uId) {
		UId = uId;
	}
	public String getUName() {
		return UName;
	}
	public void setUName(String uName) {
		UName = uName;
	}
	public List<TbSched> getScheds() {
		return scheds;
	}
	public void setScheds(List<TbSched> scheds) {
		this.scheds = scheds;
	}
	public TbSched getSched() {
		return sched;
	}
	public void setSched(TbSched sched) {
		this.sched = sched;
	}
	public String getDuId() {
		return duId;
	}
	public void setDuId(String duId) {
		this.duId = duId;
	}

	public SchedServiceImpl getSchedServiceImpl() {
		return schedServiceImpl;
	}

	public void setSchedServiceImpl(SchedServiceImpl schedServiceImpl) {
		this.schedServiceImpl = schedServiceImpl;
	}

	public int getTotal() {
		return total;
	}

	public void setTotal(int total) {
		this.total = total;
	}

	public int getPage() {
		return page;
	}

	public void setPage(int page) {
		this.page = page;
	}

	public int getMaxRow() {
		return maxRow;
	}

	public void setMaxRow(int maxRow) {
		this.maxRow = maxRow;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getTimeStart() {
		return timeStart;
	}

	public void setTimeStart(String timeStart) {
		this.timeStart = timeStart;
	}

	public String getTimeEnd() {
		return timeEnd;
	}

	public void setTimeEnd(String timeEnd) {
		this.timeEnd = timeEnd;
	}

	public PageUtil getPageUtil() {
		return pageUtil;
	}

	public void setPageUtil(PageUtil pageUtil) {
		this.pageUtil = pageUtil;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public List getResult() {
		return result;
	}

	public void setResult(List result) {
		this.result = result;
	}

	public String getDsName1() {
		return dsName1;
	}

	public void setDsName1(String dsName1) {
		this.dsName1 = dsName1;
	}
	
}
